<template>
	<view class="p30">
		<cust-empty desc="暂无数据" v-if="loadStatus=='none'">
		</cust-empty>
		<view>
			<time-record :list="list">
				<template v-slot="{ data }">
					<view class="card-grey-box">
						<view class="bold">{{data.vehicleName}}</view>
						<view class="mt30 flex-between" v-if="data.checkResult == 1">
							<text class="c-desc">车辆诊断</text>
							<dot-status label="正常"></dot-status>
						</view>
						<view v-else>
							<view class="mt30 flex-between" v-for="item in data.checkItemList">
								<text class="c-desc">车辆诊断</text>
								<text class="c-desc">{{item.itemName}}</text>
								<dot-status label="异常" dotColor="#EC1010" labelColor="#EC1010"></dot-status>
							</view>
						</view>

					</view>
				</template>
			</time-record>
		</view>
		<view class="nomore" v-if="loadStatus != 'none'">
			<u-loadmore :status="loadStatus" />
		</view>
	</view>
</template>

<script>
	import timeRecord from "@/components/simple/time-record.vue";
	import dotStatus from "@/components/simple/dot-status";
	import custEmpty from "@/components/cust-empty/index.vue";
	import {
		getCheckCarListAPI
	} from "@/api/api/car.js"
	import pages from "@/mixins/pages.js"
	export default {
		components: {
			timeRecord,
			dotStatus,
			custEmpty
		},
		mixins: [pages],
		onShow() {
			this.type = "object";
			this.showPropListCallcack= (obj,item)=>{
				return {
					...obj,
					id:item.id,
					vehicleName:item.vehicleName,
					checkResult:item.checkResult,
					checkItemList:item.checkItemList,
				}
			};
			this.funAPI = getCheckCarListAPI;
			this.getListFun();
		},

	}
</script>

<style>
</style>
